import request from '../utils/request';

export function pageViewApp(params) {
  return request({
    url: '/view/list',
    method: 'get',
    params,
  });
}

export function getViewApp(id) {
  return request({
    url: `/view/${id}`,
    method: 'get',
  });
}

export function getPreview(id) {
  return request({
    url: `/view/preview/${id}`,
  });
}

export function likeView(id, isLike) {
  return request({
    url: `/view/like/${id}`,
    method: 'post',
    data: {
      isLike,
    },
  });
}
